﻿@model MvcAtletIS.Models.DisciplineList

@{
    ViewBag.Title = "Zoznam disciplín";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>Zoznam disciplín: @ViewBag.Competition.Name</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Editovať položku</legend>

        @Html.HiddenFor(model => model.ID)

        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Description)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Description)
            @Html.ValidationMessageFor(model => model.Description)
        </div>
        
        <div class="editor-label">
            @Html.LabelFor(model => model.ExternalId)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ExternalId)
            @Html.ValidationMessageFor(model => model.ExternalId)
        </div>

        @Html.HiddenFor(model => model.ParentId)
        @Html.HiddenFor(model => model.CompetitionId)
        @Html.HiddenFor(model => model.DisciplineId)
        @Html.HiddenFor(model => model.CategoryId)

        <div class="editor-label">
            @Html.LabelFor(model => model.Day)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Day)
            @Html.ValidationMessageFor(model => model.Day)
        </div>

        @Html.HiddenFor(model => model.StartTime)

        <div class="editor-label">
            @Html.LabelFor(model => model.OfficialStartTime)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.OfficialStartTime)
            @Html.ValidationMessageFor(model => model.OfficialStartTime)
        </div>

        @Html.HiddenFor(model => model.Status)
        @Html.HiddenFor(model => model.DisciplineCode)
        @Html.HiddenFor(model => model.Note)
        @Html.HiddenFor(model => model.InnerCount)
        @Html.HiddenFor(model => model.Sync)
        @Html.HiddenFor(model => model.MeasurementId)

        <div class="editor-label">
            @Html.LabelFor(model => model.Relay)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Relay)
            @Html.ValidationMessageFor(model => model.Relay)
        </div>

        @Html.HiddenFor(model => model.ActivePerformanceId)
        @Html.HiddenFor(model => model.ActivePerformanceHeader)

        @Html.HiddenFor(model => model.WebId)
        @Html.HiddenFor(model => model.Active)
        @Html.HiddenFor(model => model.Modified)

        <p>
            <input type="submit" value="Uložiť" />
        </p>

        <p>
            @Html.ActionLink("Naspäť na zoznam disciplín", "Index", new { competitionId = Model.CompetitionId})
        </p>

    </fieldset>
}